﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CommonCategory.aspx.cs" Inherits="Whir_System_Module_Config_CommonCategory" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) {
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location = '../../Default.aspx';
        } 
    </script>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />
    <link href="../../Skin/Default/Css/openWindow.css" rel="stylesheet" type="text/css" />
    <link href="../../Js/Jquery/thickbox3/thickbox.css" rel="stylesheet" type="text/css"
        media="screen" />

    <script type="text/javascript" src="../../Js/Jquery/jquery.js"></script>

    <script type="text/javascript" src="../../Js/Jquery/jquery.ui.js"></script>

    <script type="text/javascript" src="../../Js/Jquery/thickbox3/thickbox.js"></script>

    <!-- BEGIN Plugin Code -->
    <link href="../../Js/Jquery/treeTable/stylesheets/jquery.treeTable.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript" src="../../Js/Jquery/treeTable/javascripts/jquery.treeTable.js"></script>

    <script type="text/javascript">

           $(document).ready(function() {

               //$("#dnd-example").treeTable();

               $("#columnTable").treeTable();

               //senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
               senfe("columnTable", "#fff", "#fff", "#d5e3ef", "#fff");

               
           });
          
    </script>

    <!--提示文字-->

    <script src="../../Js/common.js" type="text/javascript"></script>

    <script language="javascript">
        //showhint('0','<b>如何修改栏目</b><br/>在下面菜单中，右键选择您需要修改的栏目节点，点击“编辑此栏目”进行下一步操作。<br/><b>如何删除栏目</b><br/>在下面菜单中，右键选择您需要修改的栏目节点，点击“删除此栏目”进行下一步操作。');
    </script>

    <style type="text/css">
    html { 
        overflow-x:hidden; /*隐藏水平滚动条*/ 
    } 
    
    
    /* TABLE
     * ========================================================================= */
    .columnTable {
      border: 1px solid #888;
      border-collapse: collapse;
      line-height: 1;
      margin: 1em auto;
      width: 100%;
    }

    /* Caption
     * ------------------------------------------------------------------------- */
    .columnTable caption {
      font-size: .9em;
      font-weight: bold;
    }

    /* Header
     * ------------------------------------------------------------------------- */
    .columnTable thead {
      background: #aaa url(../images/bg-table-thead.png) repeat-x top left;
      font-size: .9em;      
    }

    .columnTable thead tr th {
      border: 1px solid #888;
      font-weight: normal;
      padding: .3em 1.67em .1em 1.67em;
      text-align: left;
      height:25px;
      font-weight: bold;                 
    }

    /* Body
     * ------------------------------------------------------------------------- */
    .columnTable tbody tr td {
      cursor: default;
      padding: .3em 1.5em;
    }

    .columnTable tbody tr.even {
      background: #f3f3f3;
    }

    .columnTable tbody tr.odd {
      background: #fff;
    }

    .columnTable span {
      background-position: center left;
      background-repeat: no-repeat;
      padding: .2em 0 .2em 1.5em;
    }

    .columnTable span.file {
      background-image: url(../images/page_white_text.png);
    }

    .columnTable span.folder {
      background-image: url(../../Js/Jquery/treeTable/images/folder.gif);
      cursor:hand;
    }
    
    #senfe {
	width: 300px;
	border-top: #000 1px solid;
	border-left: #000 1px solid;
    }
    #senfe td {
	    border-right: #000 1px solid;
	    border-bottom: #000 1px solid;
    }

    </style>

    <script language="javascript">
    <!--
        function senfe(o, a, b, c, d) {
            var t = document.getElementById(o).getElementsByTagName("tr");
            for (var i = 0; i < t.length; i++) {
                t[i].style.backgroundColor = (t[i].sectionRowIndex % 2 == 0) ? a : b;
                t[i].onclick = function() {
                    if (this.x != "1") {
                        this.x = "1"; //本来打算直接用背景色判断，FF获取到的背景是RGB值，不好判断
                        this.style.backgroundColor = d;
                    } else {
                        this.x = "0";
                        this.style.backgroundColor = (this.sectionRowIndex % 2 == 0) ? a : b;
                    }
                }
                t[i].onmouseover = function() {
                    if (this.x != "1") this.style.backgroundColor = c;
                }
                t[i].onmouseout = function() {
                    if (this.x != "1") this.style.backgroundColor = (this.sectionRowIndex % 2 == 0) ? a : b;
                }
            }
        }
    -->
    </script>

    <script type="text/javascript" language="javascript">
        function ChangeColumnSotr(columnID, operator, changeID) {
            var url = "../../UserControls/Common/ChangeTypeSotr.ashx?ID=" + columnID + "&action=" + escape(operator) + "&CID=" + changeID;
            
            var id = "<%= TypeID %>";
            $.getScript(url, function() {
                if (typeof (data) != undefined) {
                    if (data)
                        location.href = "CommonCategory.aspx?ID=" + id;
                    else
                        alert("移动失败！");
                }
            });
        }
    </script>

    <script language="javascript" type="text/javascript">
        function ConFirm(columnID) {
            if (confirm("确定要删除该类别吗?")) {
                location.href = "AddType.aspx?Action=Delete&ColumnID=" + columnID;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <table align="center" width="100%">
            <tr>
                <td colspan="2">
                    &nbsp;&nbsp;<a href="AddType.aspx?Action=Add&ColumnID=<%= TypeID %>&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=550&modal=true" class="thickbox">添加类别</a>
                    &nbsp;&nbsp;<a href="AddType2.aspx?Action=Add&ColumnID=<%= TypeID %>&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=550&modal=true" class="thickbox">快速添加</a>
                </td>
            </tr>
            <tr>
                <td>
                    <table id="columnTable" align="center" width="100%" class="columnTable">
                        <thead>
                            <tr height="20px" class="grid_Title">
                                <td>
                                    &nbsp;&nbsp;&nbsp;&nbsp;类别名称</td>
                                <td>
                                    &nbsp;</td>
                                <td width="10%" align="center">
                                    排序</td>
                                <td width="20%">
                                    &nbsp;</td>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                        </tbody>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
